using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class AreaRoleUserMappingMap : EntityTypeConfiguration<AreaRoleUserMapping>
	{
		public AreaRoleUserMappingMap()
		{
			// Primary Key
			this.HasKey(t => t.Id);

			// Properties
			this.Property(t => t.Code)
				.HasMaxLength(10);
				
			this.Property(t => t.EmployeeCode)
				.HasMaxLength(20);
				
			// Table & Column Mappings
			this.ToTable("AreaRoleUserMapping");
			this.Property(t => t.Id).HasColumnName("Id");
			this.Property(t => t.Code).HasColumnName("Code");
			this.Property(t => t.Type).HasColumnName("Type");
			this.Property(t => t.EmployeeCode).HasColumnName("EmployeeCode");
			this.Property(t => t.LastLoginTime).HasColumnName("LastLoginTime");
			this.Property(t => t.SId).HasColumnName("SId");
			this.Property(t => t.IsDeleted).HasColumnName("IsDeleted");
		}
	}
}

